package com.igeek.boot.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;

public class User {
    private Integer id;

    private String name;

    private Integer age;

    private String gender;

    //@DateTimeFormat(pattern = "yyyy/MM/dd")//将实体返回的字符串数据 有效的转换为(yyyy/MM/dd)格式的时间

    //搭配@RequestBody注解来使用，将实体返回的JSON格式数据 有效的转换为(yyyy/MM/dd)格式的时间
    @JsonFormat(pattern = "yyyy/MM/dd",timezone = "Asia/Shanghai")
    private LocalDate birthday;

    private String pic;

    private String pwd;

    private String state;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender == null ? null : gender.trim();
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic == null ? null : pic.trim();
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd == null ? null : pwd.trim();
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }
}